package com.llws.petgoodsshop.bean;

import java.io.Serializable;

/**
 * 
 * @TableName order
 */
public class Order implements Serializable {
    /**
     * 订单编号
     */
    private Integer orderId;

    /**
     * 用户编号
     */
    private Integer userId;

    /**
     * 下单时间
     */
    private String date;

    /**
     * 发货地址
     */
    private String address;

    /**
     * 0：已删除，1：未删除，默认为1
     */
    private Integer delFlag;

    /**
     * 商品id
     */
    private Integer goodsId;

    private static final long serialVersionUID = 1L;

    /**
     * 订单编号
     */
    public Integer getOrderId() {
        return orderId;
    }

    /**
     * 订单编号
     */
    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    /**
     * 用户编号
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 用户编号
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 下单时间
     */
    public String getDate() {
        return date;
    }

    /**
     * 下单时间
     */
    public void setDate(String date) {
        this.date = date;
    }

    /**
     * 发货地址
     */
    public String getAddress() {
        return address;
    }

    /**
     * 发货地址
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 0：已删除，1：未删除，默认为1
     */
    public Integer getDelFlag() {
        return delFlag;
    }

    /**
     * 0：已删除，1：未删除，默认为1
     */
    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    /**
     * 商品id
     */
    public Integer getGoodsId() {
        return goodsId;
    }

    /**
     * 商品id
     */
    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Order other = (Order) that;
        return (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", orderId=").append(orderId);
        sb.append(", userId=").append(userId);
        sb.append(", date=").append(date);
        sb.append(", address=").append(address);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}